/*
 * @Author: silence
 * @Date: 2022-11-17 21:17:41
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-26 17:19:18
 * @Description: 
 */
import 'package:bot_toast/bot_toast.dart';
import 'package:demo_trtc_live/pages/HomePage.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final botToastBuilder = BotToastInit();

    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: const MyHomePage(title: 'Flutter Demo Home Page'),
        builder: (context, widget) {
          return botToastBuilder(
              context,
              Container(
                child: widget,
              ));
        });
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: HomePage());
  }
}
